From: Jo-Philipp Wich Date: Thu, 11 Nov 2021 11:48:07 +0000 (+0100) Subject: luci-mod-network: use firewall.getZoneColorStyle() in interface view X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22http:/www.crowdsec.net/%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22?a=commitdiff_plain;h=dd54dcef26ebf4e09deaae4837f30e649ef54e61;p=project%2Fluci.git luci-mod-network: use firewall.getZoneColorStyle() in interface view Use the new `firewall.getZoneColorStyle()` helper to apply background zone color styles to the interface boxes. Signed-off-by: Jo-Philipp Wich (cherry picked from commit 849772df96784a0d5480ddf6305e30e7d442740f) --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index 49c6879637..611bbe81a7 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -1187,7 +1187,7 @@ return view.extend({ var node = E('div', { 'class': 'ifacebox' }, [ E('div', { 'class': 'ifacebox-head', - 'style': 'background-color:%s'.format(zone ? zone.getColor() : '#EEEEEE'), + 'style': firewall.getZoneColorStyle(zone), 'title': zone ? _('Part of zone %q').format(zone.getName()) : _('No zone assigned') }, E('strong', net.getName().toUpperCase())), E('div', {